import math
import json
class Shape:
    def __init__(self):
        raise NotImplementedError()
        
class Triangle(Shape):
    def __init__(self,a,h):
        self.__a = a
        self.__h = h
        self.__s = a*h/2
    def GetS(self):
        return self.__s
    
class Rectangle(Shape):
    def __init__(self,a,b):
        self.__a = a
        self.__b = b
        self.__s = a * b
    def GetS(self):
        return self.__s
    
class Circular(Shape):
    def __init__(self,r):
        self.__r = r
        self.__s = math.pi * r * r
    def GetS(self):
        return self.__s
    
class MixinPrintArea:
    def AreaPrint(self):
        print("area = {}".format(self.GetS()))
        
class PrintTriangleArea(MixinPrintArea,Triangle):
    pass

class PrintRectangleArea(MixinPrintArea,Rectangle):
    pass

class SerializeArea():
    def Serialize(self):
        return json.dumps(self.__dict__)
    
class PrintCircularArea(MixinPrintArea,SerializeArea,Circular):
    pass



a = PrintTriangleArea(5,6)
a.AreaPrint()
b = PrintRectangleArea(5,6)
b.AreaPrint()
c = PrintCircularArea(5)
c.AreaPrint()
print(c.Serialize())


# 类名是要大写字母开头，但是里面的方法，还是要小写，其他完成的还可以
